/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utils;

import java.awt.Dimension;
import java.awt.Toolkit;
import javax.swing.JFrame;

/**
 *
 * @author linux
 */
public class MaximizeWindow {
   
    public MaximizeWindow(){
    
    }
    
    public static void MaximizeWindow(JFrame m_frame){
        String osName = System.getProperty("os.name");
        if (osName.equals("Linux")){
            Toolkit toolkit = Toolkit.getDefaultToolkit();
            Dimension screenSize = toolkit.getScreenSize();
            m_frame.setSize(screenSize);
        }else{
            m_frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
        }
    }
}
